package Scanner;

import java.util.Scanner;

public class ScannerDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入您的年龄");
        int age = sc.nextInt();
        if (age >= 18){
            System.out.println("恭喜您，满足需求");
            System.out.println("请输入您的名称");
            String name = sc.next();
            System.out.println("Welcome:" + name);
        }else{
            System.out.println("抱歉，您的年龄为满足需求");
        }
    }

}